<% layout('/layouts/default.html', {title: '人数统计', libs: ['dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
				<i class="fa icon-user"></i> ${text('人数统计')}
			</div>
			
		</div>
		<div class="box-body">
			<#form:form id="searchForm" model="${empUser}" action="${ctx}/sys/empUser/stateListData" method="post" class="form-inline ">
					</#form:form>
			<table id="dataGrid"></table>
		</div>
	</div>
</div>
<% } %>
<script>
// 初始化DataGrid对象
$('#dataGrid').dataGrid({
	searchForm: $("#searchForm"),
	columnModel: [

		{header:'${text("学校名称")}', name:'office.officeName', index:'a.update_date', width:200, align:"center"},
		{header:'${text("本年度入职")}', name:'f', index:'f', width:200, align:"center"},
		{header:'${text("调入")}', name:'g', index:'g', width:200, align:"center"},
		{header:'${text("在职人数")}', name:'a', index:'a', width:200, align:"center"},
		{header:'${text("调出人数")}', name:'b', index:'b', width:200, align:"center"},
		{header:'${text("离职人数")}', name:'c', index:'c', width:200, align:"center"},
		{header:'${text("辞去公职人数")}', name:'d', index:'d', width:200, align:"center"},
		{header:'${text("退休人数")}', name:'e', index:'e', width:200, align:"center"},
		{header:'${text("已确认人数")}', name:'m', index:'m', width:200, align:"center",formatter: function(val, obj, row, act){
			var actions = [];
			actions.push('<a href="${ctx}/sys/empUser/action?office.officeCode='+row.office.officeCode+'&action=m" class="btnList" title="${text("已确认人数")}" ><i class="fa icon-login"></i>('+val+')</a>&nbsp;');
			return actions.join('');
		}},
		{header:'${text("未登录人数")}', name:'n', index:'n', width:200, align:"center",formatter: function(val, obj, row, act){
			var actions = [];
			actions.push('<a href="${ctx}/sys/empUser/action?office.officeCode='+row.office.officeCode+'&action=n" class="btnList" title="${text("未登录人数")}" ><i class="fa icon-logout"></i>('+val+')</a>&nbsp;');
			return actions.join('');
		}},
		{header:'${text("已修改人数")}', name:'x', index:'x', width:200, align:"center",formatter: function(val, obj, row, act){
			var actions = [];
			actions.push('<a href="${ctx}/sys/empUser/action?office.officeCode='+row.office.officeCode+'&action=x" class="btnList" title="${text("已修改人数")}" ><i class="fa icon-user-following"></i>('+val+')</a>&nbsp;');
			return actions.join('');
		}},
		
	],
	// 加载成功后执行事件
	ajaxSuccess: function(data){
		
	}
});

</script>
